home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 July / CHIP 2006-07.2.iso / program / google / google-toolbar-win.xpi / amulet-jslib / firefox-commands.js < prev    next >
Encoding:
Text File  |  2006-05-15  |  452 b   |  15 lines

  1. function PROT_CommandController(commandHandlerMap) {
  2. this.debugZone = "commandhandler";
  3. this.cmds_ = commandHandlerMap;
  4. }
  5. PROT_CommandController.prototype.supportsCommand = function(cmd) {
  6. return (cmd in this.cmds_);
  7. }
  8. PROT_CommandController.prototype.isCommandEnabled = function(cmd) {
  9. return true;
  10. }
  11. PROT_CommandController.prototype.doCommand = function(cmd) {
  12. return this.cmds_[cmd]();
  13. }
  14. PROT_CommandController.prototype.onEvent = function(cmd) { }
  15.